package comxin.stringtest;

import java.util.Scanner;

public class TTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        0-670-82162-4
        String data = sc.next();
        int num=0;
        int index=1;
        String[] split = data.split("-");

        for(int i=0;i<split.length-1;++i){
            for(int j=0;j<split[i].length();j++){
                num=num+(split[i].charAt(j)-'0')*index;
                index++;
            }
        }



        int res=num%11;
        if (res==Integer.parseInt(split[split.length-1])){
            System.out.println("Right");
        }else {
            StringBuilder sb = new StringBuilder(data);
            sb.deleteCharAt(sb.length()-1);
            if(res==10){
                sb.append('X');
            }else {
                sb.append(res);
            }
            System.out.println(sb.toString());
        }
    }
}
